import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import AreaTopPage from '../views/AreaTopPage.vue'
import Harvest from '../views/harvest.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path:'/areaTop',
    component:AreaTopPage
  },
  {
    path:'/harvest',
    component:Harvest
  },
  {
    path:'/prop',
    component:() => import('../views/cropAreasProportion.vue')
  },
  {
    path:'/coverage',
    component:() => import('../views/CropCoverage.vue')
  },
  {
    path:'/trend',
    component:() => import('../views/GrowthTrendPage.vue')
  },
  {
    path:'/total',
    component:() => import('../views/TotalAreaCropsProprtion.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
